Beginning DAX with Power BI by Philip Seamark
Author:Philip Seamark
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
The calculations produce the same result, only this time we used a column from a different table. The DAX engine automatically applies a filter to every calculation in the Count of Sales column (except, in this case, for the very bottom total). The difference here is that the filtering is taking place in the ‘Dimension Date’ table , which then makes its way down through the one-to-many relationship and is applied to the data in the ‘Fact Sale’ table.
To generate a value of 89 for the top row, the DAX engine knows you want to filter the data for rows associated with the January 1, 2013. The [Date] column is unique in the ‘Dimension Date’ table and is also the column specified in the active relationship between ‘Dimension Date’ and ‘Fact Sale’.
Information contained in the relationship is required because you are using columns from two tables to generate the value for the calculated measure. So, the DAX engine finds every row in the ‘Fact Sale’[Invoice Date Key] column that has an exact match with the filtered value from the ‘Dimension Date’[Date] column. It’s these rows that are used by the [Count of Sales] calculated measure to generate a value for the relevant cells.
A good question to ask at this point is why you should use the column from the ‘Dimension Date’ table when it produces the same result as using the [Invoice Date Key] column from the actual ‘Fact Sales’ table. Surely it is more efficient to use a column from the same table to filter the rows in which the data is being used in the calculations?
Some advantages of using filters from related tables include the following:Dimension tables can be used to filter multiple fact-style tables. This example contains a single fact table. If you also had report visuals that used data from other fact tables, such as ‘Fact Purchase’ or ‘Fact Order’, these probably have relationships to the same ‘Dimension Date’ table. Any slicer or filter based on a column from the ‘Dimension Date’ table automatically propagates down through multiple one-to-many relationships to be applied to calculations using columns in each of the related fact tables.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Brazilian Economy since the Great Financial Crisis of 20072008 by Philip Arestis Carolina Troncoso Baltar & Daniela Magalhães Prates(339960)
International Integration of the Brazilian Economy by Elias C. Grivoyannis(111496)
The Art of Coaching by Elena Aguilar(53526)
Flexible Working by Dale Gemma;(23340)
How to Stop Living Paycheck to Paycheck by Avery Breyer(19807)
Thinking, Fast and Slow by Kahneman Daniel(12474)
The Acquirer's Multiple: How the Billionaire Contrarians of Deep Value Beat the Market by Tobias Carlisle(12409)
The Radium Girls by Kate Moore(12134)
The Art of Thinking Clearly by Rolf Dobelli(10664)
Hit Refresh by Satya Nadella(9221)
The Compound Effect by Darren Hardy(9110)
Tools of Titans by Timothy Ferriss(8543)
Atomic Habits: Tiny Changes, Remarkable Results by James Clear(8471)
Turbulence by E. J. Noyes(8162)
A Court of Wings and Ruin by Sarah J. Maas(8043)
Change Your Questions, Change Your Life by Marilee Adams(7893)
Nudge - Improving Decisions about Health, Wealth, and Happiness by Thaler Sunstein(7803)
How to Be a Bawse: A Guide to Conquering Life by Lilly Singh(7582)
Win Bigly by Scott Adams(7301)